simplified key calculation