almost done. Not working properly yet!