fixing endpoint variable
fixing endpoint variable