added if __name__ == '__main__' statement for tests