implemented pending tests and uncommented application code