First attempt at writing the software..