there must be a better way, but for now this is it.