My python code for GB project