function before class