changes to function layout