fixes indentation and adds 2 new functions