updated to use views