added in bunch of stuff im a bad devloper
added sorting
josh