Changed indentation for function

Code was incorrectly indented. Has been fixed now.