Tested

Tested code, fixed code. working properly