first version some cleanup needed