* added more logic