implemented write back cache