Almost finished with logic layer