creating methods in python