fix the basic implementation