added checks for arguments