added methods and all necessary classes