added a paint algorithm for rampart