putting code in all the right places..