(mostly) defines