better handling for single or multiple endpoints
adding tests for single or multiple endpoints