cleanup and added the command for retrieving data