rename some things
switch to a lambda