add a constructor to init privatekey