Updated manually due to terminal issue, debugged code.