started some code, this is still a mess