changed prototype function to work with new file format