added a bit to functions