started working on logic