far from perfect but ok design