initialize pid correctly