use slice casting to boost performance