update to #287

incorporated suggestions by @nickvandewiele