working version with configure files