edits and big function change