solving this mess