added spinner code