added legacy keys support