a partial implementation