added capacity variable