edit and bug fix