fixed divmod