added more register handling --KW