implemented init method