moved remaining methods belonging to both functions to new class