refactor loader with a css3 spiner