added some type signatures