code formatting + bugfix