added spinner support + refactoring
added spinner support + refactoring