+refactor a lot