core functionality implementation