fix bugs and add jar dependencies