fixed R and added null data