add support functions for compositing