better use of space. still not working for some cases in plasma