add profile and fix bugs