added null checka