added unit tests for core