clean up code. FINAL