adding some params checks