somehow works, half way done