updated with @cvasilak comments