camera refactor