refactored API, added new card layout