4th Commit

Combined Jessica's version with better modifications. Imported Luo's
version as well