first invite thing. should be rewritten