Implemented Edit functionality