tests passing, fixed function contexts