further moves function into protype