added test page
removed duplicate code