used mixins to make view code more concise