first ugly workable version