moved code to class file from edit page