test code -> solution code

made it complete solution code not a test code