update based on @jwunder input