deleted unneccesary null check