return inside of mutex instead of out