editing functions (now fully functional