add basic functionality for fast response without ajax