added some stronger typing