implemented range()

fixed some formatting stuff