fixing endpoint syntax error