dont ignore offset + some coding style corrections