lots of changes, still not working yet