fixing indentation and prev