updated to work in ShamRack