small change on logic