first push after reorganizing code, not really tested