replaced code using brackets editor