updated core with tests