Trying to solve canvas bag problem