changed function formatting: added indents