fixes the js practices