start organizing some code