finish the basic logic