added test cases subroutine
added test cases subroutine