Made working logic system and test cases