Code clean: moved helper method