fixed bug for edit, adding functionality for checkbox