Added test for valid input

improved design with dependencies