logic system is now working