Added basic views function logic