seperate out buildKey