added a little logic