defines constants, setup function