sim function

Details, generics, and methods for the sim class