success message added
server side refactoring