sort of implemented, also amde a big mess