refactored and added tests for the root url