messy implementation for rainier