fixes sql like query in daytimes, need to fix iteration