a custom plugin to get block location