ok so order matters here apparently...
simplify a bit