post method
completed both get and post method