Have added most of the functions