shop and switch function