adding handler and api