add view support...some refactoring is needed