some code paul made

keeping it updated