simplify some bullshit code