init stuff, badly organized