removed unneccesary null-checks