updated to 80 percent functionality