refactor camera