Partial implementation of step 9, missing some of the deferrable functions