updated and fixed some minor bugs