fixing hardcoding to ArrayList