Reformatted code for readability