Basic logic implemented