removing global storage from the picture - not finished