Tested and working. Formatted.