solved a bit of logic problem