adding back spinner and fixing previous bug