decouple some presentation logic from controller