Optimized version for raspberry