debugged cluster flattening function and script
renamed samples