first approach towards logic implementation