add some more logic