basic logic added