privatized methods, todo: fix padding