refactored python code