handle method in py