[cleaning] moving endpoint adding into separate methods