code in decent shape