putting together functions