Moved echo out of function and cleaned up indentation