you can use interpolation to shorten this up a bit