adding some more logic to master