adding tests and updating dynamic route parsing