add some handy hooks
Change key calculation