added typings and stub code