abit code tidying