alot of work, should have commited earlier