needed a null check