created simple logic