interim version - 
several modifications - naming and vectorization