create terrible store proc function

it doesn't work and will break for sure...lots of problems with it