Optimized Code for Space