#40 performance improvement