fixes, needs refactor