some more code. will reclean and redo later