fixes/refactor