prototyping functions (this version doesnt compile out of the box)