update dependencies
optimize code