shameless forking + my own customizations