enhancements

 added reversed loop version, and optimised for empty array in sync
fixed bug in reverse, promoted version