added classes and some small functionality