added key check