Added main function for testing