removed spacing and re-edited some functions