Added py function and solved implicit 0 situations