Further progress, not working properly yet