bug fixes and slightly optimizing heavy rotation view function