should this be extracted to a separate file?