bug fixes
refactor