cap support

Suggestions and critics are welcome :)
Remember to include the header here.