Solving issue with array diff (converting array to hash) and formating