Code reformatted for better readability