make class functions work