added spinner and waitOn functions