Added rough cpp equivalent