adding some checks