part of CS2105 project 2