adjust code to resolve issue with views