js function works well and map completely, leaving the css layout