Basic Java impl- will switch to Python