added new functions

validate function, clearData, deleteItem function, editItem function