implemented basic webhook handler