update to improve efficiency