Added classes and new functions