added unit tests for modified viewtype functions