changed parameters to switch interface