Finished writing the code for both of these