Not too sure if this works. Didn't get time to test though the logic is there. Have to check into it later.