modify spacing and cleaning up functions