refactor to allow more data in view