only a couple functions left to implement