bug fix
added pi api calls.