terminal working, rendering bugs fixed