added writeblock and params