working on integration with S4 data structures