added some alternative ways of doing this