Works. Now it must be optimized.