rough prototype with logic