some ugly initial stuff