added more logic, still work to do !