finished materialbox implementation, needs tweaking