finishing implementation of finite differences based derivative check and improving tests