implemented four APIs