brought all pieces of code up to speed with SQ counter part