bugfix
minor refactor