adjusted many things to new architecture