updated flow chart with additional comments, changed constants from bool to ints