added basic retry logic