Converted tabs to spaces in modified function