Reasonably working version