replaced all tabs with 4 spaces. put everything in an if __name__ == "__main__" block.