amended views to generic, added tests