added endpoint
replaced security groups with endpoints
formatting
renamed method