tested and fixed some bugs but it works as expected now.