creating method responsible for return formated hash