updated views and added model validation