Refactoring

refactoring. changed data array to form object data