Reordered functions for readbility's sake