updated conversion file to work with multiple file types