added saving / loading state in gain-node + removing the resources argument