trasfered a function to the brainmaps.js