implemented core functionality