added basic logic