fixed indentation and fixed minor bug