added data clearing and refill