shorter version using implicit paramaters