downgraded api requirement and fixed minor bugs