update functional and unit tests for handler