updateData switch added + bug with caching fixed