make this easier for porting to anoher device