Optimized Lsb implementation