really messy implementation of 009, but it works