made resource an underpackage to model