would be good to get rid of the duplication here