added first pass at viewchange -- needs work