more work on the functions we'll need