added new things and fixed bugs