Basic logic finished