https://alandroidnet.com/dev/G and K solution