cleaned up inline code