updated application and fixed bugs