definitions fixed, prototype kinda works