add secondary and all logic