refactor figure view