added edit entry logic