changed some functions to simple static from struct functions