added foundation calculations for rem