tested and works
merge changes