replace size with contentSize