camera refactoring