added more logic :-)