logic is on working