rbg with pointers