fixed formatting/indentation, still need to figure out the last line thing