added unit tests, fixed bugs in accel task