init method, other methods rewritten to work