added simulator class for the given problem