base code

this was the original code