cleaned some code up, added values to edit