refactor for simplicity and add basic off canvas