first function looks good.