more formatting and bug removal