Modified to easy testing of frontend.